﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp16
{
    class Program
    {
        static void Main(string[] args)
        {
            {
                string connectionString = "server=.;database=Support；uid=sa;pwd=123456";
                SqlConnection sqlConnection = new SqlConnection(connectionString);

                sqlConnection.Open();

                var sqlcommandString = "select * from Users";

                SqlCommand sqlCommand = new SqlCommand(sqlcommandString, sqlConnection);

                var sda = sqlCommand.ExecuteReader();
                while (sda.Read())
                {
                    Console.WriteLine("{0}\t{1}\t{2}\t", sda["Id"], sda["name"], sda["stringId"]);

                }
                sqlConnection.Close();


        }
    }
}
